// c++类成员限定符
#include <iostream>
using namespace std; 

class Kitty
{
public: //任何地方都可以访问
    void eat(){cout << "进食" << endl;}
    void sleep(){cout << "睡觉" << endl;}
    void actCute(){cout << "卖萌" << endl;}

protected:  //只能在本类域及其后代类域中访问
    int x ;
    int y ;
    void f()
    {
        x = 2;
        y = 2;

        cout << x << endl;
        cout << y << endl;
    }

    private:    //只能在本类域内访问
        int m;
};

class A : public Kitty
{
    void f()
    {
        x = 4;
        y = 4; 
    }
};

int main()
{
    Kitty mycat;

    mycat.eat();
    mycat.sleep();
    mycat.actCute();

    return 0;
}